package state.person;

public enum PersonType
{
    
    Basic(0x01),
    Dummy(0xFF) //for testing
    
    ;
    
    private byte identifier;
    
    private PersonType(int identifier)
    {
        this.identifier = (byte) identifier;
    }
    
    public byte getIdentifier()
    {
        return identifier;
    }
    
    public static PersonType getPersonTypeForId(byte identifier)
    {
        for (PersonType p : PersonType.values())
        {
            if (identifier == p.getIdentifier())
            {
                return p;
            }
        }
        
        return null;
    }
    
}
